<template>
  <div class="item-detail" style="height:100vh;">
   <template >
      <iframe :src="path" :style="styleFitWin"></iframe>
    </template>
  </div>
</template>

<script>
export default {
  data() {
    return {
      token: localStorage.getItem('token'),
      id: '' ,//详情id
      path:'',
         styleFitWin: { position: 'fixed',   height:  (document.documentElement.clientHeight || document.body.clientHeight)+'px ', width: (document.documentElement.clientHeight || document.body.clientHeight)* 1.77+'px ',top: '50%',left: '50%',transform: 'translate(-50%,-50%)'  },
    };
  },
  created() {
    this.id = this.$route.query.id;
    this.getData();
  },
  methods: {
    getData() {
      this.$api('cloud.getdata', { token: this.token, id: this.id }).then(res => {
        this.path=res.data.file_path
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.item-detail {
  background-color: #ffffff;
}
</style>
